update SP+EP - #209
Conversation
…ffix_draft_token_ids` (#195)
Co-authored-by: Aurick Qiao <aurick.qiao@snowflake.com>
Shift Parallelism paper link: https://arxiv.org/abs/2509.16495
This reverts commit 170082f.
Co-authored-by: Mert Hidayetoglu <mert.hidayetoglu@snowflake.com> Co-authored-by: Aurick Qiao <aurick.qiao@snowflake.com>
Co-authored-by: Ye Wang <ye.wang@snowflake.com>
Signed-off-by: Stas Bekman <stas.bekman@snowflake.com>
Signed-off-by: Stas Bekman <stas.bekman@snowflake.com>
…-eng/ArcticInference-internal into tunji/verl_integration
… (#76) Co-authored-by: Ye Wang <ye.wang@snowflake.com> Co-authored-by: Jeff Rasley <jeff.rasley@snowflake.com> Co-authored-by: 151130f5470be3da5eea21fd02baa3_snow <bb9ecf6d788c5c0e03a13a6ec00039@snowflake.com> Co-authored-by: Michael Wyatt <michael.wyatt@snowflake.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Compare sender HF names against the receiver model's expected set and fail loud on mismatch so Qwen3-32B colocated runs catch architecture drift early. Co-authored-by: Cursor <cursoragent@cursor.com>
- receiver: raise on incomplete CUDA IPC load (tensor-count mismatch), validate received parameter names on NCCL/CPU paths, and accept either serialized bytes or (name, tensor) pairs in load_weights_from_cpu - replica_pool: raise RuntimeError when any worker's sync_weights status is not "done" instead of swallowing the failure - api/multi_model: add /spec_weights_info and /sync_spec_weights endpoints plus Driver forwarding for multi-model mode Co-authored-by: Cursor <cursoragent@cursor.com>
Add load_weights_cuda_ipc_chunk to the weight-sync receiver, which loads one param (or small chunk) at a time from CUDA IPC handles instead of requiring the whole model in one payload. It raises on any GPU missing a handle and runs full param-name validation on the final chunk (context=cuda_ipc_stream). Add the matching InferenceWorker collective_rpc wrapper. This bounds peak extra GPU memory during sync to one full param per GPU. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Stas Bekman <stas.bekman@snowflake.com>
…Arctic Platform (#263)
Arctic rl/integration
Co-authored-by: Stas Bekman <stas.bekman@snowflake.com>
| @app.post("/init") | ||
| async def init_endpoint(request: InitRequest): | ||
| try: | ||
| n = await backend.initialize( | ||
| request.config, model_id=request.model_id, | ||
| num_replicas=request.num_replicas, | ||
| ) | ||
| return {"status": "ready", "model_id": request.model_id, "num_replicas": n} | ||
| except Exception as e: | ||
| raise HTTPException(status_code=500, detail=str(e)) | ||
|
|
||
|
|
||
| @app.post("/generate") | ||
| async def generate_endpoint(request: GenerateRequest): | ||
| try: | ||
| results = await backend.generate(**request.model_dump()) | ||
| return {"results": results} | ||
| except RuntimeError as e: | ||
| msg = str(e).lower() | ||
| if "paused" in msg or "cancelled" in msg: | ||
| raise HTTPException(status_code=503, detail=str(e)) | ||
| raise HTTPException(status_code=500, detail=str(e)) | ||
| except Exception as e: | ||
| raise HTTPException(status_code=500, detail=str(e)) |
There was a problem hiding this comment.
🚨 Critical blocker
🔴 HIGH · FastAPI inference server exposes model init / generation / weight-sync endpoints with no authentication [NEW] · CWE-306
How to override this blocker
Resolve the finding and push, or override it:
- On this comment: add a 👎 reaction and post an inline reply disputing it.
- Add the
critical_blocker_force_overridelabel to the PR to trigger re-evaluation.
Every Critical blocker on the PR must be disputed this way — the label on its own does not override a blocker that has no 👎 and reply.
| data = path.read_bytes() | ||
| weights: list[tuple[str, torch.Tensor]] = torch.load( | ||
| io.BytesIO(data), map_location="cpu", weights_only=True, | ||
| ) |
There was a problem hiding this comment.
🟠 MEDIUM · load_weights_from_shm uses torch.load on /dev/shm file (weights_only=True but attacker-writable path) [NEW] · CWE-502
| def load_weights_from_shm_path(self, path: str) -> dict: | ||
| """Load weights from a shared memory file path.""" | ||
| weights = torch.load(path, map_location="cpu", weights_only=True) | ||
| return self._load_cpu_weights_into_model(weights) |
There was a problem hiding this comment.
🟠 MEDIUM · load_weights_from_shm_path loads weights from a caller-supplied filesystem path via torch.load [NEW] · CWE-22
| handles_list = pickle.loads( | ||
| base64.b64decode(ipc_payload["ipc_handles_pickled"])) |
There was a problem hiding this comment.
🚨 Critical blocker
🔴 HIGH · load_weights_cuda_ipc deserializes attacker-influenced pickled IPC handles via pickle.loads [NEW] · CWE-502
How to override this blocker
Resolve the finding and push, or override it:
- On this comment: add a 👎 reaction and post an inline reply disputing it.
- Add the
critical_blocker_force_overridelabel to the PR to trigger re-evaluation.
Every Critical blocker on the PR must be disputed this way — the label on its own does not override a blocker that has no 👎 and reply.
| if is_server: | ||
| listen_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | ||
| listen_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) | ||
| listen_socket.bind(("0.0.0.0", master_port)) | ||
| listen_socket.listen() | ||
| listen_fd = listen_socket.fileno() | ||
|
|
||
| store = TCPStore( | ||
| host_name=master_addr, | ||
| port=master_port, | ||
| world_size=world_size, | ||
| is_master=is_server, | ||
| timeout=timedelta(seconds=300), | ||
| use_libuv=False, | ||
| master_listen_fd=listen_fd, | ||
| ) |
There was a problem hiding this comment.
🟠 MEDIUM · stateless_init_nccl binds NCCL TCP rendezvous listener to 0.0.0.0 with no auth [NEW] · CWE-306
| class GenerateRequest(BaseModel): | ||
| model_id: str | None = None | ||
| prompts: list[str | list[int]] | ||
| sampling_params: dict[str, Any] = Field(default_factory=dict) | ||
| routing_key: str | list[str | None] | None = None | ||
| strict: bool = False | ||
|
|
There was a problem hiding this comment.
🟠 MEDIUM · GenerateRequest forwards arbitrary sampling_params dict to SamplingParams(**...) without validation · CWE-20
No description provided.